restart; IntegrateByParts := proc(a,b) local f,g; f := x -> unapply(a,x)(x); g := x -> unapply(b,x)(x); return MathML[Export](Int(f(x)*diff(g(x),x),x) =f(x)*g(x)-Int(diff(f(x),x)*g(x),x)); end proc; use Maplets[Elements] in PolyFactor := Maplet( Window( 'title' = "Integration by Parts", [ [ "Enter the function you wish to integrate: ", TextField['input'](width=20) ], [ "Propose a decomposition by parts, so that f*dg is the given function: "], [ "f(x) = ", TextField['func1'](width=20), "g(x) = ", TextField['func2'](width=20) ], [ Button("GO", 'onclick'='PartsInt'), Button("CLEAR", 'onclick'='reset'), Button("QUIT", Shutdown() ) ], MathMLViewer['MMLV1']() ] ), Action['PartsInt'](Evaluate( 'MMLV1' = 'IntegrateByParts'(func1,func2) ) ), Action['reset']( SetOption( 'func1' =" " ), SetOption( 'func2' =" " ), SetOption( 'MMLV1' ='""') ) ): end use: Maplets[Display](PolyFactor);